
local thevars sochelpV2 unempjobV2 dolefidlV2 doleV2 welfhelpV2 welffeetV2 wealthV2 morewelfV2 indust4V2 richlawV2 redistrbV2 incomgapV2
polychoric `thevars'
mat polychR = r(R)
forvalues i=1/`: word count `thevars' ' {
forvalues j=1/`i' {
local setcor `setcor' `=polychR[`i',`j']'
}
if `i' < `: word count `thevars' ' local setcor `setcor' \
}
local N = _N
clear
ssd init `thevars'
ssd set obs `N'
ssd set cor `setcor'
